﻿<form action="?m=ResponseRules&a=saverules" method="post" name="frm_saverules">
<input type="hidden" name="Id" value="{$Id}" />
<table width="550">
	<tr><td class="l" width="100">规则名称：</td><td class="l"><input type="text" name="Name" value="{$Name:F.encodeHTML}" class="width_250" /></td></tr>
	<tr><td class="l" width="100">优先级：</td><td class="l">
		<select name="Priority">
			<option value="0"<eq name="Priority" value="0"> selected="selected"</eq>>0</option>
			<option value="5"<eq name="Priority" value="5"> selected="selected"</eq>>5</option>
			<option value="10"<eq name="Priority" value="10"> selected="selected"</eq>>10</option>
			<option value="15"<eq name="Priority" value="15"> selected="selected"</eq>>15</option>
			<option value="20"<eq name="Priority" value="20"> selected="selected"</eq>>20</option>
			<option value="25"<eq name="Priority" value="25"> selected="selected"</eq>>25</option>
			<option value="30"<eq name="Priority" value="30"> selected="selected"</eq>>30</option>
		</select>
	</td></tr>
	<tr><td class="l">响应对象：</td><td class="l">
		<select name="Delegate" onchange="if(this.value=='msg_text'){F('.TextConfig').css({'display':''});}else{F('.TextConfig').css({'display':'none'});}">
			<optgroup label="响应事件">
				<option value="event_subscribe"<eq name="Delegate" value="event_subscribe"> selected="selected"</eq>>普通--粉丝关注</option>
				<option value="event_subscribere"<eq name="Delegate" value="event_subscribere"> selected="selected"</eq>>普通--粉丝再次关注</option>
				<option value="event_subscribe_qrcode"<eq name="Delegate" value="event_subscribe_qrcode"> selected="selected"</eq>>普通--粉丝关注（扫描二维码）</option>
				<option value="event_scan_qrcode"<eq name="Delegate" value="event_scan_qrcode"> selected="selected"</eq>>普通--扫描二维码进入微信</option>
				<option value="event_location"<eq name="Delegate" value="event_location"> selected="selected"</eq>>普通--用户发送位置</option>
				<loop name="Menus">
				<option value="{$Menus.Key}"<eq name="Menus.Key" value="Delegate" type="assign"> selected="selected"</eq>>点击--{$Menus.Name}（{$Menus.Key}）</option>
				</loop>
				<option value="event_click_default"<eq name="Delegate" value="event_click_default"> selected="selected"</eq>>点击--默认</option>
				<option value="event_default"<eq name="Delegate" value="event_default"> selected="selected"</eq>>事件--默认</option>
			</optgroup>
			<optgroup label="响应粉丝发送的消息">
				<option value="msg_text"<eq name="Delegate" value="msg_text"> selected="selected"</eq>>消息--文本消息</option>
				<option value="msg_image"<eq name="Delegate" value="msg_image"> selected="selected"</eq>>消息--图片消息</option>
				<option value="msg_voice"<eq name="Delegate" value="msg_voice"> selected="selected"</eq>>消息--语音消息</option>
				<option value="msg_video"<eq name="Delegate" value="msg_video"> selected="selected"</eq>>消息--视频消息</option>
				<option value="msg_location"<eq name="Delegate" value="msg_location"> selected="selected"</eq>>消息--位置消息</option>
				<option value="msg_link"<eq name="Delegate" value="msg_link"> selected="selected"</eq>>消息--新闻链接</option>
				<option value="msg_default"<eq name="Delegate" value="msg_default"> selected="selected"</eq>>消息--默认</option>
			</optgroup>
			<option value="global_default"<eq name="Delegate" value="global_default"> selected="selected"</eq>>全局--默认</option>
		</select>
	</td></tr>
	<tr class="TextConfig" style="display:<eq name="Delegate" value="msg_text">''</else>none</eq>"><td class="l">匹配方式：</td><td class="l">
	<input type="radio" name="MatchType" value="1"<eq name="MatchType" value="1"> checked="checked"</eq><empty name="MatchType"> checked="checked"</empty> /> 精确匹配
	<input type="radio" name="MatchType" value="0"<eq name="MatchType" value="0"> checked="checked"</eq> /> 模糊匹配</td></tr>
	<tr class="TextConfig" style="display:<eq name="Delegate" value="msg_text">''</else>none</eq>"><td class="l">匹配关键字：</td><td class="l"><input type="text" class="width_250" name="Keyword" value="{$Keyword:F.encodeHTML}" /></td></tr>
	<tr><td class="l">响应内容：</td><td class="l">
		<select name="MsgId" onchange="ShowHelp(this);">
		<option value="TEXT"<eq name="MsgId" value="TEXT"> selected="selected"</eq>>普通文本</option>
		<loop name="Messages">
		<option value="{$Messages.Id}"<eq name="Messages.Id" value="MsgId:F.int" type="assign"> selected="selected"</eq>>常用消息--{$Messages.Name}（{$Messages.MsgType}）</option>
		</loop>
		<loop name="Functions">
		<option rel="{$Functions.Comment:F.encode}" value="{$Functions.Key}"<eq name="Functions.Key" value="MsgId" type="assign"> selected="selected"</eq>>{$Functions.Name}</option>
		</loop>
		</select><br />
		<div id="func-help"></div>
	</td></tr>
	<tr class="TextResponse" style="display:<eq name="MsgId" value="TEXT">''</else>none</eq>"><td class="l">文本内容：</td><td class="l">
	<input type="text" name="Details" value="{$Details:F.encodeHTML}" id="message_intro" class="width_250" /></td></tr>
</table>
</form>